<template>
  <div id="app">
    <img src="./assets/logo.png"/>
    <hello-world :msggp="'jiangnan'"></hello-world>
    <hello-world @greet="see" value="'nimeide '">
      <h3 slot="panel_head"> Panel Head 来自于 父组件</h3>
      为什么
    </hello-world>

<!--    父组件内容-->
    <hello-world :books="books">
      <template slot="list"  slot-scope="props">
<!--        props 只是一个作用域标识符-->
        <li class="list-group-item">{{props.xx.name}}</li>
        <li class="list-group-item">{{props.xx.price}}</li>
      </template>



    </hello-world>
  </div>
</template>

<script>
  import HelloWorld from "./components/HelloWorld";

  export default {
    name: "App",
    components: {
      HelloWorld,
    },
    data() {
      return {
        jiangnan: (dataaa) => {
          alert(dataaa)
        },
        nimei: '你妹阿德啊',
        books:
          [
            {name: '江南的风', price: 100},
            {name: 'PHP From Novice TO Idiot', price: 200},
            {name: 'JAVA will die ', price: 0.5},
          ],

      }
    },
    methods:
      {
        see: () => {
          window.alert("see see you ,Bad Asshole");
        }
      }
  };
</script>

<style>
  #app {
    font-family: "Avenir", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    margin-top: 60px;
  }
</style>
